package com.hacoc.countdown.dao;

import java.sql.Date;
import java.util.List;

import com.hacoc.common.DAOException;
import com.hacoc.common.dao.BaseDAO;
import com.hacoc.countdown.model.Advice;
import com.hacoc.countdown.model.CountDown;
import com.hacoc.countdown.model.MyCountDown;
import com.hacoc.countdown.model.TagType;
import com.hacoc.countdown.model.UserInfo;

public interface CountDownDAO extends BaseDAO {
	public List findCountDown() throws DAOException;
	public List findCountDown(String filter,String orderBy,
			final int start,final int end) throws DAOException;
	public List findCountDownByHolidayTypeId(String holidayTypeId) throws DAOException;
	public List findCountDownByTitle(String title) throws DAOException;
	public List findCountDownByCountDownId(String countDownId) throws DAOException;
	public int updateCountDownState(String countDownId, String stateId) throws DAOException;
	public int updateCountDownTops(String countDownId) throws DAOException;
	public String insertCountDown(CountDown countDown) throws DAOException;
	public int deleteCountDown(String countDownId) throws DAOException;
	
	public List findMyCountDown(String userId) throws DAOException;
	public void insertMyCountDown(MyCountDown myCountDown) throws DAOException;
	public int deleteMyCountDown(String countDownId, String userId) throws DAOException;
	
	public List findUserInfo() throws DAOException;
	public List findUserInfoByUserId(String userId) throws DAOException;
	public String insertUserInfo(UserInfo userInfo) throws DAOException;
	public int deleteUserInfo(String userId) throws DAOException;
	
	public List findHolidayType() throws DAOException;
	
	public List findAdvice(String filter,String orderBy,
			final int start,final int end) throws DAOException;
	public String insertAdvice(Advice advice) throws DAOException;	
	
	public List findFavorite(String userId) throws DAOException;
	public List findFavoriteByCountDownId(String countDownId) throws DAOException;
	public int insertFavorite(String countDownId,String userId,
			Date collectDate,String remarks) throws DAOException;
	public int deleteFavorite(String countDownId,String userId) throws DAOException;
	
	public List findTagTypeTop(int tops) throws DAOException;
	public String insertTagType(TagType tt) throws DAOException;
	public int updateTagType(String tagId)  throws DAOException;
}
